package com.kob.backend.controller.record;

import com.alibaba.fastjson2.JSONObject;
import com.kob.backend.service.record.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RecordController {

    @Autowired
    private RecordService recordService;

    @GetMapping("/api/record/getList/")
    JSONObject getRecordList(@RequestParam Map<String,String> data){
        Integer page = Integer.parseInt(data.get("page"));
        String select = data.get("select");
        Integer userId = Integer.parseInt(data.get("userId"));
        return recordService.getRecordList(page,select,userId);
    }

}
